
<div id="table_index">
<table>
  <?php 
    $i = 1;
    //$chunkedArray = array_chunk($productsList, 8);
    foreach ($productsList as $product) {  
    	$mod = $i%8;
    	if ($mod+1==2) { echo "<tr>";}
        	if ($product['slug']=='list') {
        		$i = $i+3;
  ?>
            <td colspan="3" class="table_fix">
            <h1><?php echo CHtml::link(strtoupper(Yii::t('msg', 'viewAllPremiumProducts')), array(Yii::app()->language .'/productCategories/index')); ?></h1>
            </td>        		
        	<?php }else { 
        		$i++
        		?>
            <td>
            <?php echo  CHtml::link(CHtml::image($product['thumbnailPath']), array(Yii::app()->language.'/products/view/'.$product['slug']));?> 
            </td>
  <?php
          }
        
    if ($mod==0) { echo "</tr>";}
  }?>  
</table>
</div>
<div id="content_index">
	<?php echo $page->description;?>
</div>
